<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>思途CMS4.1</title>
    {template 'stourtravel/public/public_js'}
    {php echo Common::getCss('style.css,base.css,base2.css,base_new.css'); }
    {php echo Common::getScript("jquery.validate.js"); }
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js,choose.js,product_add.js,imageup.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
   <style>
        .error{
            color:red;
            padding-left:5px;
        }

    </style>

</head>
<body style="background-color: #fff">
<table class="content-tab">
    <tr>
        <td width="119px" class="content-lt-td" valign="top">
            {template 'stourtravel/public/leftnav'}
            <!--右侧内容区-->
        </td>
        <td valign="top" class="content-rt-td">

            <form id="frm" name="frm">
            <div id="product_grid_panel" class="manage-nr">
            	<div class="cfg-header-bar">
            		<div class="cfg-header-tab">
            			<span  class="item on" id="basic" onclick="window.location.href=SITEURL+'{$cmsurl}fenxiao/admin/fenxiao/edit/{if isset($_GET['menuid'])}menuid/{$_GET['menuid']}/{/if}memberid/{$memberid}'">基础信息</span>
                        <span class="item" onclick="window.location.href=SITEURL+'{$cmsurl}fenxiao/admin/fenxiao/suborder/{if isset($_GET['menuid'])}menuid/{$_GET['menuid']}/{/if}?memberid={$memberid}'">下级推广订单</span>
                        <span class="item" onclick="window.location.href=SITEURL+'{$cmsurl}fenxiao/admin/fenxiao/submember/{if isset($_GET['menuid'])}menuid/{$_GET['menuid']}/{/if}?memberid={$memberid}'">分销关系</span>
                        <span class="item" onclick="window.location.href=SITEURL+'{$cmsurl}fenxiao/admin/fenxiao/record/{if isset($_GET['menuid'])}menuid/{$_GET['menuid']}/{/if}?memberid={$memberid}'">佣金记录</span>
            		</div>
            		<a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
            	</div>
               
                <div class="product-add-div" >
                	<ul class="info-item-block">
                		<li>
                			<span class="item-hd">昵称：</span>
                			<div class="item-bd lh-30">
                				{$info['nickname']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">分销商账号：</span>
                			<div class="item-bd lh-30">
                				{$info['account']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">推广订单数：</span>
                			<div class="item-bd lh-30">
                				{$fxinfo['subordernum']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">下级分销商数：</span>
                			<div class="item-bd lh-30">
                				{$fxinfo['subnum']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">推广订单总额：</span>
                			<div class="item-bd lh-30">
                				{$fxinfo['suborder_amount']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">佣金余额：</span>
                			<div class="item-bd lh-30">
								{php echo number_format($info['money']-$info['money_frozen'],2,'.','');}
                			</div>
                		</li>
                	</ul>
                    <div class="line"></div>
                    <ul class="info-item-block">
                    	<li>
                			<span class="item-hd">分销商等级：</span>
                			<div class="item-bd lh-30">
                				{$fxinfo['fxrank_name']}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">所在分销组：</span>
                			<div class="item-bd">
                				<span class="select-box w150">
                					<select class="select" name="groupid">
                                        <option value="0">默认分组</option>
                                     {loop $groups $group}
                                        <option value="{$group['id']}" {if $group['id']==$fxinfo['fxgroupid']}selected="selected"{/if}>{$group['title']}</option>
                                     {/loop}
                                    </select>
                				</span>
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">审核：</span>
                			<div class="item-bd">
                				{if $fxinfo['status']==-1}未申请
                                {else}
                                <label class="radio-label mr-20">
                                	<input type="radio" name="status" {if $fxinfo['status']==0}checked="checked"{/if} value="0"/>待审核
                                </label>
                                <label class="radio-label mr-20">
                                	<input type="radio" name="status" {if $fxinfo['status']==1}checked="checked"{/if} value="1"/>通过
                                </label>
                                <label class="radio-label mr-20">
                                	<input type="radio" name="status" {if $fxinfo['status']==2}checked="checked"{/if} value="2"/>不通过
                                </label>		
                                {/if}
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">冻结状态：</span>
                			<div class="item-bd">
                				<label class="radio-label mr-20">
                					<input type="radio" name="isfrozen" {if $fxinfo['isfrozen']==0}checked="checked"{/if} value="0"/>未冻结
                				</label>
                				<label class="radio-label mr-20">
                					<input type="radio" name="isfrozen" {if $fxinfo['isfrozen']==1}checked="checked"{/if} value="1"/>已冻结
                				</label>	
                			</div>
                		</li>
                		<li>
                			<span class="item-hd">成为分销商时间：</span>
                			<div class="item-bd lh-30">
                				{$fxinfo['fxjointime']}
                			</div>
                		</li>
                   </ul>
                </div>
                <div class="clear clearfix pt-20 pb-20">
                    <a class="btn btn-primary radius size-L ml-115" id="btn_save" href="javascript:;">保存</a>
                    <input type="hidden" id="id" name="id" value="{$fxinfo['id']}">
                </div>
            </div>
            </form>
        </td>
    </tr>
</table>


<script language="JavaScript">



    $("#btn_save").click(function(){
        Ext.Ajax.request({
            url   :  SITEURL+"fenxiao/admin/fenxiao/ajax_save",
            method  :  "POST",
            isUpload :  true,
            form  : "frm",
            success  :  function(response, opts)
            {

                var data = $.parseJSON(response.responseText);
                if(data.status)
                {
                    //$("#id").val(data.productid);
                    ST.Util.showMsg('保存成功!','4',2000);
                }
                else
                {
                    ST.Util.showMsg(data.msg,'5',2000);
                }


            }
        });
    });






</script>

</body>
</html>